-
Notifications
You must be signed in to change notification settings - Fork 115
Change DataInKeySpacePath to contain a KeySpacePath instead of ResolvedKeySpacePath #3716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change DataInKeySpacePath to contain a KeySpacePath instead of ResolvedKeySpacePath #3716
Conversation
…edKeySpacePath It was unnecessary to have the ResolvedKeySpacePath, and we want to be able to import into a different cluster, where the resolved values are different from the exported data. This means that DataInKeySpacePath has a few more fields, but makes it more versatile going forward.
|
|
||
| public CompletableFuture<ResolvedKeySpacePath> getResolvedPath() { | ||
| return resolvedPath; | ||
| this.value = value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of copying the byte[] here and in getValue, I created an issue to convert it to ByteString: #3717
| * @return a future that completes with the resolved path including the remainder | ||
| */ | ||
| @Nonnull | ||
| public CompletableFuture<ResolvedKeySpacePath> getResolvedPath(@Nonnull FDBRecordContext context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this going to be used? Is this intended for future (import)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was added to make the tests keep working, but the tests have been updated since then, and so it makes sense to remove the last usage.
| */ | ||
| @Nonnull | ||
| public CompletableFuture<ResolvedKeySpacePath> getResolvedPath(@Nonnull FDBRecordContext context) { | ||
| return path.toResolvedPathAsync(context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path.toResolvedPathAsync can be removed from the interface (only called internally)?
| * @return a new {@code ResolvedKeySpacePath} that is the same as this, except with a different {@link #getRemainder()}. | ||
| */ | ||
| @Nonnull | ||
| @VisibleForTesting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if getResolvedPath is removed from DataInKeyspacePath, then maybe this method can be removed as well (or stay as VisibleForTesting?)
This is only needed by KeySpacePathImpl.exportAllData, so lets not pollute the interface until needed. I kept the tests around because I think that gives some extra coverage in a nicer way than having it all on exportAllData.
No production code is using it anymore. We could inline it, but I feel like keeping the constructor private is more valuable.
Conflicted on KeySpacePath
It was unnecessary to have the ResolvedKeySpacePath, and we want to be able to import into a different cluster, where the resolved values are different from the exported data.
This means that DataInKeySpacePath has a few more fields, but makes it more versatile going forward.
This also changes
exportAllDatato usemapPipelinedto resolve the path, so thatDataInKeySpacePathdoes not contain a future.This is in support of #3573